<?php /*a:3:{s:50:"D:\phpstudy_pro\WWW\tp\view\home\invoice\bill.html";i:1600223665;s:51:"D:\phpstudy_pro\WWW\tp\view\home\common\static.html";i:1601423018;s:54:"D:\phpstudy_pro\WWW\tp\view\home\common\resources.html";i:1601423784;}*/ ?>
<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>BOOL酒店管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/xadmin.css">
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js"></script>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.0.3/jquery.js"></script>
    <script src="/static/jquery.printarea.js"></script>

    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


    <link href="/static/toastr/toastr.css" rel="stylesheet"/>
    <script src="/static/toastr/toastr.js"></script>

</head>
<!--<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.css" rel="stylesheet">-->
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.css">
<script src="/static/bootstrap/js/bootstrap.js"></script>
    <body>
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">演示</a>
                <a>
                    <cite>导航元素</cite></a>
            </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>
        <div class="layui-fluid" id="a2">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <table class="layui-table layui-form">
                                <thead>
                                    <tr>
                                        <th>房间号</th>
                                        <th>房间类型</th>
                                        <th>预设单价</th>
                                        <th>押金</th>
                                        <th>折扣</th>
                                        <th>折后价</th>
                                </thead>
                                <tbody>
                                <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                    <tr>
                                        <td><?php echo htmlentities($vo['room_num']); ?></td>
                                        <td><?php echo htmlentities($vo['type_name']); ?></td>
                                        <td><?php echo htmlentities($vo['price']); ?>￥</td>
                                        <td><?php echo htmlentities($vo['deposit']); ?>￥</td>
                                        <td><?php echo htmlentities($vo['name']); ?>:<?php echo htmlentities($vo['a_price']); ?></td>
                                        <td><?php echo htmlentities($vo['price'] * $vo['a_price']); ?>￥</td>
                                    </tr>
                                <?php endforeach; endif; else: echo "" ;endif; if(is_array($follow) || $follow instanceof \think\Collection || $follow instanceof \think\Paginator): $i = 0; $__LIST__ = $follow;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                <tr>
                                    <td><?php echo htmlentities($v['room_num']); ?></td>
                                    <td><?php echo htmlentities($v['type_name']); ?></td>
                                    <td><?php echo htmlentities($v['price']); ?>￥</td>
                                    <td><?php echo htmlentities($v['deposit']); ?>￥</td>
                                    <td></td>
                                    <td><?php echo htmlentities($v['price'] * $vo['a_price']); ?>￥</td>
                                </tr>
                                <?php endforeach; endif; else: echo "" ;endif; ?>

                                <tr>
                                    <td>合计</td>
                                    <td></td>
                                    <td><?php echo htmlentities($list[0]['price'] + $price); ?>￥</td>
                                    <td><?php echo htmlentities($list[0]['deposit'] + $deposit); ?>￥</td>
                                    <td></td>
                                    <!--<td>总共需要：<?php echo htmlentities($list[0]['deposit'] + $list[0]['price']*$list[0]['a_price']); ?>￥</td>-->
                                    <td>总共需要：<?php echo ($list[0]['price'] + $price) * $list[0]['a_price'] +  $list[0]['deposit'] + $deposit ?>￥</td>
                                </tr>
                                </tbody>
                            </table>
                            <hr class="layui-bg-black">
                            <div class="layui-container">

                                <div class="layui-row">
                                    <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                                        <p>宾客姓名：<?php echo htmlentities($list[0]['guest_name']); ?></p>
                                        <p>证件号码：<?php echo htmlentities($list[0]['credentials']); ?></p>
                                    </div>
                                    <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                                        <p>性别：<?php echo htmlentities($list[0]['guest_sex']); ?></p>
                                        <p>押金：<?php echo htmlentities($list[0]['deposit']); ?></p>
                                    </div>
                                    <div class="layui-col-xs4 layui-col-sm12 layui-col-md4">
                                        <p>促销活动：<?php echo htmlentities($list[0]['name']); ?></p>
                                        <p>付款方式：<?php echo htmlentities($list[0]['payment_id']); ?></p>
                                        <p>宾客签字：xxx</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <button class="layui-btn"  id="aa">
            <i class="layui-icon"></i>打印票据
        </button>
    </body>

<script>layui.use(['laydate', 'form'],
        function() {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });
    $(document).ready(function(){
        $("#aa").click(function(){
            $("#a2").printArea();
        });
    });
</script>


</html>